package com.dandandog.framework.oss.service;

import com.dandandog.framework.oss.entity.OssBucket;
import com.dandandog.framework.oss.entity.OssItem;

import java.io.InputStream;
import java.util.Collection;
import java.util.List;

/**
 * @author JohnnyLiu
 */
public interface OssFileService {

    List<String> getAllBuckets();

    OssBucket getBucketByName(String bucketName);

    void createBucket(String bucketName);

    void removeBucket(String bucketName);

    Collection<OssItem> getAllItems(String bucketName, String prefix);

    OssItem getItem(String bucketName, String itemName);

    String putItem(String bucketName, String itemName, InputStream stream);

    String putItem(String itemName, InputStream stream);

    void removeItem(String itemName);


}
